import request from '@/utils/request'

/**
 * @description: 获取员工列表
 * @param {*} params {page:当前页,size：每页条数}
 * @return {*}
 */
export function getEmployeeList(page, size) {
  return request.get('/sys/user', { params: { page, size }})
}

/**
 * @description: 添加员工
 * @param {*} data
 * @return {*}
 */
export function addEmployee(data) {
  return request.post('/sys/user', data)
}

/**
 * @description: 获取员工
 * @param {*} id 员工id
 * @return {*}
 */
export function getEmployee(id) {
  return request.get(`/sys/user/${id}`)
}

/**
 * @description: 删除员工
 * @param {*} id 员工id
 * @return {*}
 */
export function delEmployee(id) {
  return request.delete(`/sys/user/${id}`)
}

/**
 * @description: 导入excel
 * @param {*} data
 * @return {*}
 */
export function importEmployee(data) {
  return request.post('/sys/user/batch', data)
}
